package com.cjst.controller.base;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cjst.pojo.base.ShortTemplate;
import com.cjst.service.base.ShortTemplateService;
import com.cjst.util.code.PageUtil;
import com.cjst.util.json.ResultObj;
import com.itextpdf.text.List;

@Controller
@RequestMapping("/base/shortTemplate")
public class ShortTemplateController extends BaseController{
	@Autowired
	private ShortTemplateService shortTemplateService;
	
	@RequestMapping(value = "", method = RequestMethod.GET)
	public String toDept() {
	    return "base/shortTemplate/list";
	}
	@RequestMapping(value = "/list", method = RequestMethod.POST)
	@ResponseBody
	public Object list() {
	    PageUtil<ShortTemplate> pageUtil = shortTemplateService.listPageCount(null);
	    return super.packForBT(pageUtil);
	}
	@RequestMapping(value = "/sx", method = RequestMethod.POST)
	@ResponseBody
	public ResultObj sx() {
		shortTemplateService.sx();
	    return new ResultObj(0, "刷新成功", true);
	}
}
